<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<c:set var="ctx" value="${pageContext.request.contextPath}" />
<fieldset><legend>药&nbsp;&nbsp;品</legend>
<table class="list">
	<thead>
		<tr>
			<th>药&nbsp;&nbsp;名</th>
			<th>种&nbsp;&nbsp;类</th>
			<th>备&nbsp;&nbsp;注</th>
			<th>操&nbsp;&nbsp;作</th>
		</tr>
	</thead>
	<tbody>
		<c:forEach items="${medicines}" var="medicine" varStatus="varStatus">
			<c:set var="tr_class"
				value="${varStatus.index % 2 == 0 ? 'odd' : 'even'}" />
			<tr class="${tr_class}">
				<td><c:out value="${medicine.medicineName}" /></td>
				<td><span id="medicineCategory"><c:out
					value="${medicine.medicineCategory}" /></span></td>
				<td><c:out value="${medicine.medicineRemark}" /></td>
				<td><c:url value="/medicine/view.do" var="medicineView">
					<c:param name="medicineId" value="${medicine.medicineId}" />
				</c:url> <a href="${medicineView}">[查&nbsp;看]</a></td>
			</tr>
		</c:forEach>
	</tbody>
</table>
</fieldset>
<div style="text-align: center; height: 25px;"><a class="submit"
	href="${ctx}/medicine/new.do">新&nbsp;&nbsp;&nbsp;建</a></div>
<script type="text/javascript">
	$('span').each(function(i) {
		$(this).text(medicineCategory[$(this).text()]);
		});
</script>
